package ads_api

import (
	"server/middleware"

	"github.com/gin-gonic/gin"
)

type AdsApiRouter struct {
}

func (s *AdsApiRouter) InitAdsApiRouter(Router *gin.RouterGroup) {
	adsApiRouter := Router.Group("adsApi").Use(middleware.OperationRecord())
	adsApiRouterWithoutRecord := Router.Group("adsApi")
	var adsApiApi = AdsApiApi{}
	{
		adsApiRouter.POST("createAdsApi", adsApiApi.CreateAdsApi)
		adsApiRouter.DELETE("deleteAdsApi", adsApiApi.DeleteAdsApi)
		adsApiRouter.DELETE("deleteAdsApiByIds", adsApiApi.DeleteAdsApiByIds)
		adsApiRouter.PUT("updateAdsApi", adsApiApi.UpdateAdsApi)
	}
	{
		adsApiRouterWithoutRecord.GET("findAdsApi", adsApiApi.FindAdsApi)
		adsApiRouterWithoutRecord.GET("getAllAdsApis", adsApiApi.GetAllAdsApis)
		adsApiRouterWithoutRecord.GET("getAdsApiList", adsApiApi.GetAdsApiList)
		adsApiRouterWithoutRecord.POST("getAdsApi", adsApiApi.GetAdsApi)
	}
}
